Skip to content

STY: remove --keep-runtime-typing from pyupgrade Final_Part-5 #40805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 6, 2021

Conversation

fathomer
Copy link
Contributor

@fathomer fathomer commented Apr 6, 2021

To fix issue #40759 :
Changes here are from PEP585 (e.g. List[str] -> list[str]) and from PEP604 (Optional[str] -> str | None), both of which are only applied in the presence of from future import annotations. Some imports became unused after this so those have been removed.
As there were changes in many files (97) this has been split up into 5 smaller PRs.
This is the final PR 5 of 5.
Checks in this one will pass only when other parts are merged as --keep-runtime-typing is removed the pyupgrade precommit hook.

Refer the discussion here : #40773

@fathomer fathomer changed the title STY: remove --keep-runtime-typing from pyupgrade #40759 Final_Part-5 STY: remove --keep-runtime-typing from pyupgrade Final_Part-5 Apr 6, 2021
@MarcoGorelli
Copy link
Member

MarcoGorelli commented Apr 6, 2021

@github-actions pre-commit


the above hasn't worked - @fathomer could you run pre-commit again please?

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me pending green

@MarcoGorelli MarcoGorelli added the Code Style Code style, linting, code_checks label Apr 6, 2021
@MarcoGorelli MarcoGorelli added this to the 1.3 milestone Apr 6, 2021
@MarcoGorelli
Copy link
Member

Thanks @fathomer !

@MarcoGorelli MarcoGorelli merged commit b7cb3dc into pandas-dev:master Apr 6, 2021
@fathomer
Copy link
Contributor Author

fathomer commented Apr 6, 2021

Thanks @fathomer !

Thanks @MarcoGorelli for all the help and clear details of the task.
Glad to make my first ever open source contribution here! :)

JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
…-dev#40805)

* STY: remove --keep-runtime-typing from pyupgrade pandas-dev#40759 Final_Part-5

* fixup pyupgrade

* fixup

* fixup

* noop

Co-authored-by: Marco Gorelli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STYLE remove --keep-runtime-typing from pyupgrade
2 participants